1. Field of the Invention
The present invention relates to a technique for detecting a motion vector from image data generated based on a subject image input through a lens having aberration such as distortion in an imaging device.
2. Description of the Related Art
A digital camcorder and a digital still camera photograph a subject, and encode and store a captured moving image. Examples of the digital camcorder and the digital still camera include an interchange lens type (for example, a digital single-lens reflex camera) having a detachable lens. The lens can be replaced by various lenses such as a telephoto lens and a wide-angle lens according to a photographic scene. Examples of the lens include a super-wide-angle lens referred to as a fisheye lens. The super-wide-angle lens has great distortion. An image captured by the super-wide-angle lens is magnified toward a center of a frame, and is reduced toward a periphery of the frame. On the other hand, there is a known technique (Japanese Patent Application Laid-Open No. 2008-193458) for correcting distortion of a lens in an imaging device having an attached super-wide-angle lens.
A technique for compression-encoding moving image data and storing the compression-encoded moving image data in a storage medium is generally used in a device taking a moving image to acquire an input signal. A high efficiency encoding system such as moving picture experts group phase 2 (MPEG-2) or H.264 has been known as a system for encoding the moving image data. The high efficiency encoding system employs a method referred to as inter-frame prediction (inter prediction) to obtain high compression efficiency. The method generates prediction image data based on frames at different times, and encodes difference image data between input image data and the prediction image data. A technique indispensable in the inter-frame prediction is motion compensation. This technique is used to detect a motion vector and generate the prediction image data from reference image data and the motion vector, to further reduce an amount of information of the difference image data.
Here, when the taken image data is greatly distorted, the motion compensation of the conventional technique causes the following problem. For example, a subject image is distorted by distortion of a lens, and thereby a shape of a subject represented by input image data becomes different from that of a subject represented by reference image data. This disadvantageously causes reduction in encoding efficiency when motion compensation is performed.